package com.luoc.service.impl;

import com.luoc.service.Observer;
import com.luoc.service.Subject;

/**
 * @Author: luoc
 * @Date: 2019/9/24 15:57
 */
public class ConcreteSubject extends Subject {
    private int subState;

    public int getSubState() {
        return subState;
    }

    public void setSubState(int subState) {
        this.subState = subState;
    }

    @Override
    public void notifyUp() {
        for (Observer o: observers) {
             o.update();
        }
    }
}
